package com.paris10.model;

import java.util.List;

public class ArticleMarkdown extends Article {
	
	public ArticleMarkdown(String chemin){
		super();
		this.setLien(chemin);
		this.setDescription("");
	}
	
	public void traiterData(List<StringBuilder> listeLignes, String[] motsCles){
		this.interessant = false;
		
		for(StringBuilder stringb : listeLignes){
			for(String mot : motsCles){
				if(stringb.toString().toLowerCase().contains(" "+mot.toLowerCase()+" ") 
						|| stringb.toString().toLowerCase().contains(" "+mot.toLowerCase()+".")){
					interessant = true;
					this.setDescription(getDescription()+stringb.toString());
				}
			}
		}
	}
}
